﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Demo.Models.Dto
{
    public class CompanyAddDto
    {
        [Display(Name = "公司名称")]
        [Required(ErrorMessage = "{0}必填")]
        [MaxLength(100, ErrorMessage = "{0}最大长度为{1}")]
        public string Name { get; set; }

        [Display(Name = "简介")]
        [StringLength( 20,MinimumLength = 500, ErrorMessage = "{0}最大长度为{1}到{2}")]
        public string Introduction { get; set; }

        public IEnumerable<EmployeeAddDto> Employees { get; set; } = new List<EmployeeAddDto>();
    }
}